///@file MaterialPoint
///@brief Declaration of the class defining a material point
///@author Arnaud Duval
///@version 0.0
///@date 2010/03/25

#ifndef MATERIALPOINT_H
#define MATERIALPOINT_H

#include "Material.h"
#include "StrainTensor.h"
#include "StressTensor.h"
#include <string>

///@class MaterialPoint
///@brief Class describing a material point
class MaterialPoint
{
    private:
        ///@brief Material assigned to material point
        Material* mat;
        ///@brief Number of internal variables
        unsigned int nbIntVar;
        ///@brief List of internal variables affected to material point
        double* internalVar;
        ///@brief Labels of corresponding to internal variables
        std::string* intVarLabels;
        ///@brief Stress state
        StressTensor stress;
        ///@brief Strain state
        StrainTensor strain;
        ///@brief Temperature
        double T;
        ///@brief Spatial dimension of the material point
        unsigned int dim;
        ///@brief Coordinates in the reference element
        double *refCoords;
        ///@brief Coordinates in the structural element
        double *structCoords;
    public:
        ///@brief Default constructor
        MaterialPoint();
        ///@brief Constructor with arguments
        MaterialPoint(Material*, unsigned int);
        ///@brief Copy constructor
        MaterialPoint(const MaterialPoint &);
        ///@brief Destructor
        ~MaterialPoint();
        ///@brief Overload of = operator
        MaterialPoint& operator=(const MaterialPoint&);
        ///@brief Direct access to temperature
        double& Temperature();
        ///@brief Direct access to stress state
        StressTensor& Stress();
        ///@brief Direct access to strain state
        StrainTensor& Strain();
        ///@brief Direct access to an internal variables
        double& IntVar(unsigned int);
        ///@brief Direct access to the label of an internal variables
        std::string& IntVarlabel(unsigned int);
        ///@brief Set the material
        void SetMaterial(Material *);
        ///@brief Return coordinate in the reference element
        double GetRefCoord(unsigned int);
        ///@brief Return coordinate in the structural element
        double GetStructCoord(unsigned int);
        ///@brief Set the coordinate in the reference element
        void SetRefCoord(unsigned int, double);
        ///@brief Set the dimension of the MaterialPoint
        void SetDimension(unsigned int);
};




#endif
